//.cpp
#include "Function.h"
void MyDLL::Function::openMemory(void)
{
	PRTCONSUMERCSB pSharedMemory = NULL;
	RtOpenSharedMemory(PAGE_READWRITE, FALSE, SharedMemoryName, (void**)&pSharedMemory);
	mPSharedMemory = pSharedMemory;
}
cli::array<unsigned short>^ MyDLL::Function::getChannel0()
{
	cli::array<unsigned short>^ receivedData = gcnew cli::array<unsigned short>(DataLimit);
	for (size_t i = 0; i < DataLimit; i++)
	{
		receivedData[i] = MyDLL::Function::mPSharedMemory->Channel0[i];
	}
	return receivedData;
}
cli::array<unsigned short>^ MyDLL::Function::getChannel1()
{
	cli::array<unsigned short>^ receivedData = gcnew cli::array<unsigned short>(DataLimit);
	for (size_t i = 0; i < DataLimit; i++)
	{
		receivedData[i] = MyDLL::Function::mPSharedMemory->Channel1[i];
	}
	return receivedData;
}